package model

import (
	"gddgame.cc/galaxy/common/dsl/db"
	"gddgame.cc/galaxy/common/dsl/game"
	"gddgame.cc/galaxy/common/dsl/game/user"
)

var (
	UserModel *db.Table

	Provider = game.ModuleProvider{
		Name:    "maze",
		Depends: []string{"ad", "config", "group", "reward", "playbook_stat", "achievement", "base", "user"},
		OnInit: func(env *game.Environment) error {
			var err error
			if UserModel, err = env.RegisterModel(user.UserName, DefaultUser); err != nil {
				return err
			}
			return nil
		},
	}
)
